package com.example.demo.model;

import lombok.*;
import org.springframework.stereotype.Component;

@Component//只能是一个对象,如果要创建多个对象,只能用@Bean
//@AllArgsConstructor
//@NoArgsConstructor
//@Data
@ToString
@Getter @Setter
public class UserInfo {

    private Integer id;
    private String name;
    //你自己写一个构造方法

    public UserInfo(){
        System.out.println("无参的");
    }
    public UserInfo(Integer id,String name) {
       this.id = id;
       this.name = name;
    }
}
